package com.hmy.finance.api.bo.core.response.receiptOffset;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;


@Data
public class ReceiptOffsetBillDetailResponse implements Serializable {

    /**
     * 核销单 id
     */
    private Long receiptOffsetBillId;

    /**
     * 核销单单号
     */
    private String receiptOffsetBillNo;

    /**
     * 客户 id
     */
    private Long customerId;

    /**
     * 客户名称
     */
    private String customerName;

    /**
     * 销售经理 id
     */
    private Long saleManagerId;

    /**
     * 销售经理名称
     */
    private String saleManagerName;

    /**
     * 核销单状态Code
     */
    private Integer receiptOffsetBillStatus;

    /**
     * 流程实例Id
     */
    private String processInstanceId;

    /**
     * 核销单状态名称
     */
    private String receiptOffsetBillStatusDesc;

    /**
     * 联系人信息
     */
    private List<CustomerContactorResponse> customerContactors;

    /**
     * 收款日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime receiptedTime;

    /**
     * 收款金额
     */
    private BigDecimal receiptedAmount = BigDecimal.ZERO;

    /**
     * 收款类型code
     */
    private Integer receiptedType;

    /**
     * 收款类型名称
     */
    private String receiptedDesc;

    /**
     * 客户总欠款金额
     */
    private BigDecimal customerTotalArrearsAmount = BigDecimal.ZERO;

    /**
     * 客户本次核销金额(此核销单核销金额)
     */
    private BigDecimal customerOffsetAmount = BigDecimal.ZERO;

    /**
     * 客户核销后总欠款金额
     */
    private BigDecimal customerArrearsAmountAfterOffset = BigDecimal.ZERO;

    /**
     * 客户账户余额
     */
    private BigDecimal customerBalanceAmount = BigDecimal.ZERO;

    /**
     * 联系人分摊明细
     */
    private List<ContactorApportionResponse> contactorApportionInfos;

    /**
     * 凭证信息
     */
    private ReceiptVoucherResponse receiptVoucher;

    /**
     * 核销单创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 拒绝原因
     */
    private String rejectedOpinion;

}
